home *** CD-ROM | disk | FTP | other *** search
/ Sky at Night 2007 June / SAN CD 6-2007 CD-ROM 25.iso / pc / Software / AstroGrav_Win / Java / jre1.6.0 / lib / rt.jar / javax / imageio / IIOImage.class (.txt) < prev    next >
Encoding:
Java Class File  |  2006-11-29  |  2.4 KB  |  105 lines

  1. package javax.imageio;
  2.  
  3. import java.awt.image.BufferedImage;
  4. import java.awt.image.Raster;
  5. import java.awt.image.RenderedImage;
  6. import java.util.List;
  7. import javax.imageio.metadata.IIOMetadata;
  8.  
  9. public class IIOImage {
  10.    protected RenderedImage image;
  11.    protected Raster raster;
  12.    protected List<? extends BufferedImage> thumbnails = null;
  13.    protected IIOMetadata metadata;
  14.  
  15.    public IIOImage(RenderedImage var1, List<? extends BufferedImage> var2, IIOMetadata var3) {
  16.       if (var1 == null) {
  17.          throw new IllegalArgumentException("image == null!");
  18.       } else {
  19.          this.image = var1;
  20.          this.raster = null;
  21.          this.thumbnails = var2;
  22.          this.metadata = var3;
  23.       }
  24.    }
  25.  
  26.    public IIOImage(Raster var1, List<? extends BufferedImage> var2, IIOMetadata var3) {
  27.       if (var1 == null) {
  28.          throw new IllegalArgumentException("raster == null!");
  29.       } else {
  30.          this.raster = var1;
  31.          this.image = null;
  32.          this.thumbnails = var2;
  33.          this.metadata = var3;
  34.       }
  35.    }
  36.  
  37.    public RenderedImage getRenderedImage() {
  38.       synchronized(this) {
  39.          return this.image;
  40.       }
  41.    }
  42.  
  43.    public void setRenderedImage(RenderedImage var1) {
  44.       synchronized(this) {
  45.          if (var1 == null) {
  46.             throw new IllegalArgumentException("image == null!");
  47.          } else {
  48.             this.image = var1;
  49.             this.raster = null;
  50.          }
  51.       }
  52.    }
  53.  
  54.    public boolean hasRaster() {
  55.       synchronized(this) {
  56.          return this.raster != null;
  57.       }
  58.    }
  59.  
  60.    public Raster getRaster() {
  61.       synchronized(this) {
  62.          return this.raster;
  63.       }
  64.    }
  65.  
  66.    public void setRaster(Raster var1) {
  67.       synchronized(this) {
  68.          if (var1 == null) {
  69.             throw new IllegalArgumentException("raster == null!");
  70.          } else {
  71.             this.raster = var1;
  72.             this.image = null;
  73.          }
  74.       }
  75.    }
  76.  
  77.    public int getNumThumbnails() {
  78.       return this.thumbnails == null ? 0 : this.thumbnails.size();
  79.    }
  80.  
  81.    public BufferedImage getThumbnail(int var1) {
  82.       if (this.thumbnails == null) {
  83.          throw new IndexOutOfBoundsException("No thumbnails available!");
  84.       } else {
  85.          return (BufferedImage)this.thumbnails.get(var1);
  86.       }
  87.    }
  88.  
  89.    public List<? extends BufferedImage> getThumbnails() {
  90.       return this.thumbnails;
  91.    }
  92.  
  93.    public void setThumbnails(List<? extends BufferedImage> var1) {
  94.       this.thumbnails = var1;
  95.    }
  96.  
  97.    public IIOMetadata getMetadata() {
  98.       return this.metadata;
  99.    }
  100.  
  101.    public void setMetadata(IIOMetadata var1) {
  102.       this.metadata = var1;
  103.    }
  104. }
  105.